<?php
return [
    'SERVER_NAME' => "EasySwoole",
    'MAIN_SERVER' => [
        'LISTEN_ADDRESS' => '0.0.0.0',
        'PORT'           => 9501,
        'SERVER_TYPE'    => EASYSWOOLE_WEB_SERVER, //可选为 EASYSWOOLE_SERVER  EASYSWOOLE_WEB_SERVER EASYSWOOLE_WEB_SOCKET_SERVER,EASYSWOOLE_REDIS_SERVER
        'SOCK_TYPE'      => SWOOLE_TCP,
        'RUN_MODEL'      => SWOOLE_PROCESS,
        'SETTING'        => [
            'worker_num'            => 8,
            'reload_async'          => true,
            'max_wait_time'         => 5,
            'document_root'         => EASYSWOOLE_ROOT . '/public',
            'enable_static_handler' => true,
        ],
        'TASK'           => [
            'workerNum'     => 4,
            'maxRunningNum' => 128,
            'timeout'       => 15
        ]
    ],
    'LOG_DIR'     => EASYSWOOLE_ROOT . '/storage/Log',
    'TEMP_DIR'    => EASYSWOOLE_ROOT . '/storage/Temp',
    /*################ MYSQL CONFIG ##################*/
    'Mysql'       => [
        'default' => [
            'host'          => '127.0.0.1',
            'port'          => '3306',
            'user'          => 'root',
            'password'      => 'root',
            'database'      => 'easyswoole-cnpscy',
            'POOL_MAX_NUM'  => '20',
            'POOL_TIME_OUT' => '0.1',
            'charset'       => 'utf8mb4',
            'timeout'       => '5',
            'prefix'        => 'cnpscy_',
        ],
        'write'   => [
            'host'          => '127.0.0.1',
            'port'          => '3306',
            'user'          => 'root',
            'password'      => 'root',
            'database'      => 'easyswoole-cnpscy',
            'POOL_MAX_NUM'  => '20',
            'POOL_TIME_OUT' => '0.1',
            'charset'       => 'utf8mb4',
            'timeout'       => '5',
            'prefix'        => 'cnpscy_',
        ]
    ],
    /*################ REDIS CONFIG ##################*/
    'Redis'       => [
        'host'          => '127.0.0.1',
        'port'          => '6379',
        'auth'          => '',
        'POOL_MAX_NUM'  => '20',
        'POOL_MIN_NUM'  => '5',
        'POOL_TIME_OUT' => '0.1',
    ],
    /**##################     JWT      #############*/
    'JWT'         => [
        'iss' => 'www.cnpscy.cn', // 发行人
        'exp' => 7200, // 过期时间 默认2小时 2*60*60=7200
        'sub' => 'cnpscy-token', // 主题
        'nbf' => null, // 在此之前不可用
        'key' => 'cnpscy', // 签名用的key
    ],
];
